﻿namespace YunQue.Common
{
    /// <summary>
    /// 一些全局的配置
    /// </summary>
    public class AppSettingManager
    {
        #region SystemName
        /// <summary>
        /// 系统名称
        /// </summary>
        public const string SYSTEMNAME = "TenantApi";
        #endregion

        #region 日志的配置
        /// <summary>
        /// 链路追踪Id
        /// </summary>
        public const string TRANCEID = "TranceId";
        /// <summary>
        /// 用户ID
        /// </summary>
        public const string USERID = "UserId";
        /// <summary>
        /// 使用时间
        /// </summary>
        public const string USINGTIME = "UsingTime";
        /// <summary>
        /// 请求地址
        /// </summary>
        public const string URL = "Url";
        /// <summary>
        /// 请求方式
        /// </summary>
        public const string METHOD = "Method";
        /// <summary>
        /// ip
        /// </summary>
        public const string REMOTEIP = "RemoteIP";
        /// <summary>
        /// 参数
        /// </summary>
        public const string PARAMETER = "Parameter";
        #endregion

        #region JWT配置
        /// <summary>
        /// jwt issuer
        /// </summary>
        public const string JWT_ISSUER = "YunqQue_WebApi";
        /// <summary>
        /// jwt audience
        /// </summary>
        public const string JWT_AUD = "YunqQue_WebApi_Adu";
        /// <summary>
        /// jwt secret
        /// </summary>
        public const string JWT_SECRET = "1q2w3e4r5t6y7u8i9o0pasdfghjklzdrfvd";
        /// <summary>
        /// jwt tenant 用于表示租户
        /// </summary>
        public const string JWT_TENANT = "TenantCode";
        /// <summary>
        /// jwt sessionid 用于表示会话状态
        /// </summary>
        public const string JWT_SESSIONID = "SessionId";
        #endregion

        #region Redis配置
        /// <summary>
        /// redis连接字符串
        /// </summary>
        public const string REDIS_CONNECTION = "127.0.0.1:6379,password=123456,defaultDatabase=0";
        /// <summary>
        /// redis主从配置 主节点
        /// </summary>
        public const string REDIS_MASTER = "mymaster,password=123456";
        /// <summary>
        /// redis 主从配置 哨兵节点
        /// </summary>
        public const string REDIS_SENTINELS = "127.0.0.1:26379;127.0.0.1:26380;127.0.0.1:26381";
        #endregion
        #region 系统CacheKey
        /// <summary>
        /// 租户权限缓存
        /// </summary>
        public const string CACHEKEY_TENANTPERMISSION = "tenant_permission_";
        /// <summary>
        /// 用户权限缓存
        /// </summary>
        public const string CACHEKEY_USERPERMISSION = "user_permission_";
        /// <summary>
        /// 用户信息
        /// </summary>
        public const string CACHEKEY_USER = "user_info_";
        /// <summary>
        /// 空缓存
        /// </summary>
        public const string CACHEKEY_EMPTY = "__EMPTY__";
        #endregion
    }
}
